make the _CUPS_MAP_ATTR_STR macro not dup the string so we don't leak
authorJohn (J5) Palmieri <johnp@redhat.com>
Wed, 10 May 2006 00:42:23 +0000 (00:42 +0000)
committerJohn Palmieri <johnp@src.gnome.org>
Wed, 10 May 2006 00:42:23 +0000 (00:42 +0000)
2006-05-10  John (J5) Palmieri  <johnp@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c:
        make the _CUPS_MAP_ATTR_STR macro not dup the string so we don't
        leak

ChangeLog
ChangeLog.pre-2-10
modules/printbackends/cups/gtkprintbackendcups.c

index 740affe9345c5bbef691761d2a57d22539990813..ac1a9d3be16983fc238615312044ebbf0315027b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-10  John (J5) Palmieri  <johnp@redhat.com>
+
+       * modules/printbackends/cups/gtkprintbackendcups.c:
+       make the _CUPS_MAP_ATTR_STR macro not dup the string so we don't
+       leak 
+
 2006-05-10  Francisco Javier F. Serrador  <serrador@cvs.gnome.org>
 
        * gtk/paper_names.c: Correct #11 Envelope typo.
index 740affe9345c5bbef691761d2a57d22539990813..ac1a9d3be16983fc238615312044ebbf0315027b 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-10  John (J5) Palmieri  <johnp@redhat.com>
+
+       * modules/printbackends/cups/gtkprintbackendcups.c:
+       make the _CUPS_MAP_ATTR_STR macro not dup the string so we don't
+       leak 
+
 2006-05-10  Francisco Javier F. Serrador  <serrador@cvs.gnome.org>
 
        * gtk/paper_names.c: Correct #11 Envelope typo.
index 81819300daa1c345c699c1d5e21203518960bb9c..ed4d95a7ace6bd92c4cabab55bca760686c247bb 100644 (file)
@@ -58,7 +58,7 @@ typedef struct _GtkPrintBackendCupsClass GtkPrintBackendCupsClass;
 #define _CUPS_MAX_CHUNK_SIZE 8192
 
 #define _CUPS_MAP_ATTR_INT(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].integer;}
-#define _CUPS_MAP_ATTR_STR(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = g_strdup (attr->values[0].string.text);}
+#define _CUPS_MAP_ATTR_STR(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].string.text;}
 
 static GType print_backend_cups_type = 0;
 
@@ -632,7 +632,7 @@ cups_request_printer_info_cb (GtkPrintBackendCups *backend,
 
   /* TODO: determine printer type and use correct icon */
   gtk_printer_set_icon_name (printer, "printer");
-  
   state_msg = "";
   loc = "";
   desc = "";
@@ -649,9 +649,6 @@ cups_request_printer_info_cb (GtkPrintBackendCups *backend,
       _CUPS_MAP_ATTR_INT (attr, job_count, "queued-job-count");
     }
 
-  /* if we got a member_printer_uri then this printer is part of a class
-     so use member_printer_uri, else user printer_uri */
-
   status_changed = gtk_printer_set_job_count (printer, job_count);
   
   status_changed |= gtk_printer_set_location (printer, loc);